package com.example.travelservlet.utils;


import com.example.travelservlet.city.service.CityService;
import com.example.travelservlet.entity.User;
import com.example.travelservlet.user.domain.TotalRow;
import com.example.travelservlet.user.domain.UserResult;

public class UserResultUtil {
    public static<T> UserResult success(String code, String msg, T data, Integer count, TotalRow totalRow) {
        UserResult result = new UserResult();
        result.setCode(code);
        result.setMsg(msg);
        result.setCount(count);
        result.setTotalRow(totalRow);
        result.setData(data);
        return result;
    }

    public static<T> UserResult success(T data,Integer count) {
        UserResult result = success("0","成功",data,count,null);
        return result;
    }
}
